/*
 Navicat Premium Data Transfer

 Source Server         : dockerMariaDb
 Source Server Type    : MySQL
 Source Server Version : 100603
 Source Host           : localhost:3306
 Source Schema         : yunang_oa

 Target Server Type    : MySQL
 Target Server Version : 100603
 File Encoding         : 65001

 Date: 10/08/2021 16:44:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for oa_department
-- ----------------------------
DROP TABLE IF EXISTS `oa_department`;
CREATE TABLE `oa_department` (
  `department_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门ID',
  `department_name` varchar(20) DEFAULT '' COMMENT '部门名称',
  `department_charger` bigint(20) DEFAULT 0 COMMENT '部门负责人',
  `department_info` varchar(200) DEFAULT '' COMMENT '部门描述',
  `parent` bigint(20) DEFAULT 0 COMMENT '上级部门',
  `status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态(1:不可用，0:可用)',
  `create_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '更新时间',
  `is_deleted` tinyint(3) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除，0:未删除)',
  PRIMARY KEY (`department_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COMMENT='OA部门表';

-- ----------------------------
-- Records of oa_department
-- ----------------------------
BEGIN;
INSERT INTO `oa_department` VALUES (1, '前端', 2, '前端研发', 0, 0, '2021-08-10 05:58:09', '2021-08-10 07:50:26', 0);
INSERT INTO `oa_department` VALUES (2, '后端', 1, '后端研发', 0, 0, '2021-08-10 05:58:09', '2021-08-10 07:49:58', 0);
INSERT INTO `oa_department` VALUES (3, '运维', 4, '产品运维', 0, 0, '2021-08-10 05:58:09', '2021-08-10 07:53:23', 0);
INSERT INTO `oa_department` VALUES (4, '产品', 9, '产品设计', 0, 0, '2021-08-10 05:58:09', '2021-08-10 07:53:10', 0);
COMMIT;

-- ----------------------------
-- Table structure for oa_task
-- ----------------------------
DROP TABLE IF EXISTS `oa_task`;
CREATE TABLE `oa_task` (
  `task_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务ID',
  `task_name` varchar(30) DEFAULT NULL COMMENT '任务名称',
  `task_content` varchar(200) DEFAULT NULL COMMENT '任务内容',
  `start_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '任务开始时间',
  `closing_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '任务截止时间',
  `task_mover` bigint(20) DEFAULT NULL COMMENT '任务发起人',
  `task_receiver` bigint(20) DEFAULT NULL COMMENT '任务接收人',
  `task_status` tinyint(8) DEFAULT 0 COMMENT '任务状态(5:已驳回，4:审核通过，3:审核中，2:待审核，1:处理中，0:待接收)',
  `create_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '更新时间',
  `is_deleted` tinyint(3) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除，0:未删除)',
  `pay_details` varchar(200) DEFAULT NULL COMMENT '交付细节',
  PRIMARY KEY (`task_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COMMENT='OA任务表';

-- ----------------------------
-- Records of oa_task
-- ----------------------------
BEGIN;
INSERT INTO `oa_task` VALUES (1, 'oa', '练', '2021-06-17 20:58:05', '2021-06-17 20:58:07', 1, 1, 0, '2021-06-17 21:02:44', '2021-07-26 22:34:08', 0, NULL);
INSERT INTO `oa_task` VALUES (2, 'oa22', '实践', '2021-07-26 11:24:25', '2021-07-26 11:24:25', 2, 3, 0, '2021-07-26 11:24:25', '2021-07-26 23:36:37', 0, NULL);
INSERT INTO `oa_task` VALUES (3, 'oa266', '完成OA接口', '2021-08-20 00:00:00', '2021-08-20 00:00:00', 4, 3, 0, '2021-08-04 14:34:24', '2021-08-04 14:47:13', 0, NULL);
INSERT INTO `oa_task` VALUES (4, 'OA', '完成oa项目', '2021-08-20 00:00:00', '2021-08-20 00:00:00', 0, 4, 0, '2021-08-04 14:34:25', '2021-08-04 14:48:32', 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for oa_test
-- ----------------------------
DROP TABLE IF EXISTS `oa_test`;
CREATE TABLE `oa_test` (
  `test_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '测试ID',
  `test_name` char(20) DEFAULT NULL COMMENT '测试名称',
  `status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态(1:不可用，0:可用)',
  `create_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建时间',
  PRIMARY KEY (`test_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COMMENT='OA测试表';

-- ----------------------------
-- Records of oa_test
-- ----------------------------
BEGIN;
INSERT INTO `oa_test` VALUES (1, '2', 0, '2021-08-10 06:24:29');
COMMIT;

-- ----------------------------
-- Table structure for oa_user
-- ----------------------------
DROP TABLE IF EXISTS `oa_user`;
CREATE TABLE `oa_user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `department_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '所属部门id',
  `user_name` varchar(30) DEFAULT NULL COMMENT '用户名称',
  `user_sex` varchar(8) DEFAULT NULL COMMENT '性别',
  `user_age` int(5) DEFAULT 0 COMMENT '年龄',
  `user_phone` varchar(30) DEFAULT NULL COMMENT '用户手机号',
  `user_qq` varchar(30) DEFAULT NULL COMMENT '用户QQ号',
  `user_position` varchar(30) DEFAULT NULL COMMENT '职位',
  `enter_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '入职时间',
  `user_address` varchar(100) DEFAULT NULL COMMENT '用户所在详细地址',
  `status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态(1:不可用，0:可用)',
  `create_time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '更新时间',
  `is_deleted` tinyint(3) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除，0:未删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3 COMMENT='OA用户表';

-- ----------------------------
-- Records of oa_user
-- ----------------------------
BEGIN;
INSERT INTO `oa_user` VALUES (1, 2, '徐啸然', '男', 18, '15851651', '1561256', '组长', '2021-06-15 12:18:25', NULL, 0, '2021-06-15 12:18:25', '2021-08-10 08:07:58', 0);
INSERT INTO `oa_user` VALUES (2, 1, '米娜', '女', 20, '1513215', '051651', '组长', '2021-06-15 12:20:02', NULL, 0, '2021-06-15 12:19:47', '2021-08-10 07:59:41', 0);
INSERT INTO `oa_user` VALUES (3, 4, '王五', '女', 19, '2555652', '584562', '组员', '2021-06-15 12:19:55', NULL, 0, '2021-06-15 12:19:55', '2021-08-10 08:00:02', 1);
INSERT INTO `oa_user` VALUES (4, 3, '姚晓坚', '女', 18, '154682', '4621156', '组长', '2021-06-15 12:20:57', NULL, 0, '2021-06-15 12:20:57', '2021-08-10 08:00:04', 1);
INSERT INTO `oa_user` VALUES (5, 1, 'lisi333', NULL, NULL, '', NULL, NULL, '2021-07-14 09:51:22', '', 0, '2021-07-14 09:51:22', '2021-08-10 08:00:09', 1);
INSERT INTO `oa_user` VALUES (6, 1, '张哈哈', '', 18, '', '', '', '2021-07-14 17:26:21', '', 0, '2021-07-14 17:26:21', '2021-08-10 08:00:11', 0);
INSERT INTO `oa_user` VALUES (7, 1, '张22', '', 18, '', '', '', '2021-07-14 17:27:27', '', 0, '2021-07-14 17:27:27', '2021-08-10 08:00:13', 0);
INSERT INTO `oa_user` VALUES (8, 1, '张33', '', 18, '', '', '', '2021-07-14 17:33:34', '', 0, '2021-07-14 17:33:34', '2021-08-10 08:00:16', 0);
INSERT INTO `oa_user` VALUES (9, 4, '孙磊', '男', 18, '13512', NULL, '组长', '2021-07-28 14:41:25', '阜阳市', 0, '2021-07-28 14:41:25', '2021-08-10 08:07:39', 0);
INSERT INTO `oa_user` VALUES (10, 2, '张小王', '男', 18, '13512', NULL, '123', '2021-07-29 17:01:26', '阜阳市', 0, '2021-07-29 17:01:26', '2021-08-04 07:23:29', 1);
INSERT INTO `oa_user` VALUES (11, 2, '小黑33', '男', 18, '13512', NULL, '123', '2021-08-04 07:22:55', '阜阳市', 0, '2021-08-04 07:22:55', '2021-08-04 07:22:55', 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
